package com.hnkywl.sts.entity.cwgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.cggl.Cgdmx;
import org.hibernate.annotations.*;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: lenovo
 * Date: 13-5-18
 * Time: 下午12:32
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_QTPZFL")
@Where(clause = "deleted!='1'")
public class Qtpzfl extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqQtpzfl", allocationSize = 1, sequenceName = "SEQ_BIZ_QTPZFL")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqQtpzfl")
    private Long id;
    /**
     * 分录编号
     */
    private Integer flbh;
    /**
     * 科目代码
     */
    private String kmdm;
    /**
     * 科目名称
     */
    @Column(length = 1000)
    private String kmmc;
    /**
     * 摘要
     */
    private String zy;
    /**
     * 借方金额
     */
    private Double jfje;
    /**
     * 贷方金额
     */
    private Double dfje;
    /**
     * 供应商代码
     */
    private String gysdm;
    /**
     * 供应商代码名称
     */
    private String gysdmmc;
    /**
     * 客户代码
     */
    private String khdm;
    /**
     * 客户代码名称
     */
    private String khdmmc;
    /**
     * 职员代码
     */
    private String zydm;
    /**
     * 职员姓名
     */
    private String zyxm;
    /**
     * 部门代码
     */
    private String bmdm;
    /**
     * 部门代码名称
     */
    private String bmdmmc;
    /**
     * 数量
     */
    private Double sl;
    /**
     * 辅助核算
     */
    private String fzhs;
    /**
     * 其他凭证
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "QTPZ_ID")
    private Qtpz qtpz;
    /**
     * 辅助核算
     */
    @OneToMany(fetch = FetchType.LAZY, targetEntity = Fzhs.class)
    @Cascade({org.hibernate.annotations.CascadeType.ALL})
    @JoinColumn(name = "QTPZFL_ID")
    private List<Fzhs> fzhsList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getFlbh() {
        return flbh;
    }

    public void setFlbh(Integer flbh) {
        this.flbh = flbh;
    }

    public String getKmdm() {
        return kmdm;
    }

    public void setKmdm(String kmdm) {
        this.kmdm = kmdm;
    }

    public String getKmmc() {
        return kmmc;
    }

    public void setKmmc(String kmmc) {
        this.kmmc = kmmc;
    }

    public String getZy() {
        return zy;
    }

    public void setZy(String zy) {
        this.zy = zy;
    }

    public Double getJfje() {
        return jfje;
    }

    public void setJfje(Double jfje) {
        this.jfje = jfje;
    }

    public Double getDfje() {
        return dfje;
    }

    public void setDfje(Double dfje) {
        this.dfje = dfje;
    }

    public String getGysdm() {
        return gysdm;
    }

    public void setGysdm(String gysdm) {
        this.gysdm = gysdm;
    }

    public String getGysdmmc() {
        return gysdmmc;
    }

    public void setGysdmmc(String gysdmmc) {
        this.gysdmmc = gysdmmc;
    }

    public String getKhdm() {
        return khdm;
    }

    public void setKhdm(String khdm) {
        this.khdm = khdm;
    }

    public String getKhdmmc() {
        return khdmmc;
    }

    public void setKhdmmc(String khdmmc) {
        this.khdmmc = khdmmc;
    }

    public String getZydm() {
        return zydm;
    }

    public void setZydm(String zydm) {
        this.zydm = zydm;
    }

    public String getZyxm() {
        return zyxm;
    }

    public void setZyxm(String zyxm) {
        this.zyxm = zyxm;
    }

    public String getBmdm() {
        return bmdm;
    }

    public void setBmdm(String bmdm) {
        this.bmdm = bmdm;
    }

    public String getBmdmmc() {
        return bmdmmc;
    }

    public void setBmdmmc(String bmdmmc) {
        this.bmdmmc = bmdmmc;
    }

    public Double getSl() {
        return sl;
    }

    public void setSl(Double sl) {
        this.sl = sl;
    }

    public String getFzhs() {
        return fzhs;
    }

    public void setFzhs(String fzhs) {
        this.fzhs = fzhs;
    }

    public Qtpz getQtpz() {
        return qtpz;
    }

    public void setQtpz(Qtpz qtpz) {
        this.qtpz = qtpz;
    }

    public List<Fzhs> getFzhsList() {
        return fzhsList;
    }

    public void setFzhsList(List<Fzhs> fzhsList) {
        this.fzhsList = fzhsList;
    }
}
